package studentSystem;

public class Students {
    private int id;
    private String name;
    private char sex;
    public Students() {
    }

    public Students(int id, String name, char sex) {
        this.id=id;
        this.name=name;
        this.sex=sex;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }
    public void introduce(){
        System.out.println("学号:"+this.getId()+" 姓名:"+this.getName()+" 性别:"+this.getSex());
    }
    public boolean judgeLegal(){
        return id < 100000000 && id > 0 && name != null && !name.equals("") && (sex == 'F' || sex == 'M');
    }
}
